﻿@using TomNet.IMSC.Model.DbModels.LowPriceHouse;
@{
    Layout = null;
    var entity = ViewData["entity"] as LowPriceHouses;
}

<!DOCTYPE html>


<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <link href="~/Content/Css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="~/Content/Css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="~/Content/Css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="~/Content/Css/animate.css" rel="stylesheet">
    <link href="~/Content/Css/style.css?v=4.1.0" rel="stylesheet">
    <title>Insert</title>
    <link href="/Content/Css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="~/Content/common.css" rel="stylesheet">
    <style>
        /*.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-12,
         .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-12{
             border-style:solid; border-width:1px; border-color:#000;
        }*/
    </style>
</head>
<body>
    <div class="wrapper wrapper-content animated fadeInRight">
        <form class="form-horizontal m-t" id="mainForm"> 


            <input type="hidden" id="Id" name="Id" value="@entity.Id" />
            <input type="hidden" id="BuildingName" name="BuildingName" value="@entity.BuildingName" />
            <input type="hidden" id="BuildingAddress" name="BuildingAddress" value="@entity.BuildingAddress" />
            <input type="hidden" id="HouseNumber" name="HouseNumber" value="@entity.HouseNumber" />
            <input type="hidden" id="ProvinceID" name="ProvinceID" value="@entity.ProvinceID" />
            <input type="hidden" id="CityID" name="CityID" value="@entity.CityID" />
            <input type="hidden" id="AreaID" name="AreaID" value="@entity.AreaID" />
            <input type="hidden" id="CostPrice" name="CostPrice" value="@entity.CostPrice" />
            <input type="hidden" id="LowPrice" name="LowPrice" value="@entity.LowPrice" />
            <input type="hidden" id="Poundage" name="Poundage" value="@entity.Poundage" />
            <input type="hidden" id="Brokerage" name="Brokerage" value="@entity.Brokerage" />
            <input type="hidden" id="BandSawBrokerage" name="BandSawBrokerage" value="@entity.BandSawBrokerage" />
            <input type="hidden" id="CommissionAccount" name="CommissionAccount" value="@entity.CommissionAccount" />
            <input type="hidden" id="AwardDescription" name="AwardDescription" value="@entity.AwardDescription" />
            <input type="hidden" id="Rules" name="Rules" value="@entity.Rules" />
            <input type="hidden" id="IsLoan" name="IsLoan" value="@entity.IsLoan" />
            <input type="hidden" id="LoanRules" name="LoanRules" value="@entity.LoanRules" />
            <input type="hidden" id="DownPaymentRate" name="DownPaymentRate" value="@entity.DownPaymentRate" />
            <input type="hidden" id="Area" name="Area" value="@entity.Area" />
            <input type="hidden" id="HouseType" name="HouseType" value="@entity.HouseType" />
            <input type="hidden" id="HouseTypeRemark" name="HouseTypeRemark" value="@entity.HouseTypeRemark" />
            <input type="hidden" id="ResidenceType" name="ResidenceType" value="@entity.ResidenceType" />
            <input type="hidden" id="BuildingsType" name="BuildingsType" value="@entity.BuildingsType" />
            <input type="hidden" id="BuildingClass" name="BuildingClass" value="@entity.BuildingClass" />
            <input type="hidden" id="DecorationCondition" name="DecorationCondition" value="@entity.DecorationCondition" />
            <input type="hidden" id="PropertyRight" name="PropertyRight" value="@entity.PropertyRight" />
            <input type="hidden" id="CreateYear" name="CreateYear" value="@entity.CreateYear" />
            <input type="hidden" id="Orientations" name="Orientations" value="@entity.Orientations" />
            <input type="hidden" id="OpeningTime" name="OpeningTime" value="@entity.OpeningTime" />
            <input type="hidden" id="LaunchTime" name="LaunchTime" value="@entity.LaunchTime" />
            <input type="hidden" id="Developer" name="Developer" value="@entity.Developer" />
            <input type="hidden" id="DeveloperBrand" name="DeveloperBrand" value="@entity.DeveloperBrand" />
            <input type="hidden" id="PropertyManagementCompany" name="PropertyManagementCompany" value="@entity.PropertyManagementCompany" />
            <input type="hidden" id="PropertyManagementFee" name="PropertyManagementFee" value="@entity.PropertyManagementFee" />
            <input type="hidden" id="CoveredArea" name="CoveredArea" value="@entity.CoveredArea" />
            <input type="hidden" id="TotalHouseholds" name="TotalHouseholds" value="@entity.TotalHouseholds" />
            <input type="hidden" id="PlotRatio" name="PlotRatio" value="@entity.PlotRatio" />
            <input type="hidden" id="GreeningRatio" name="GreeningRatio" value="@entity.GreeningRatio" />
            <input type="hidden" id="CarNumber" name="CarNumber" value="@entity.CarNumber" />
            <input type="hidden" id="ParkingRatio" name="ParkingRatio" value="@entity.ParkingRatio" />     
            <input type="hidden" id="X" name="X" value="@entity.X" />
            <input type="hidden" id="Y" name="Y" value="@entity.Y" />
            <input type="hidden" id="StarTarget" name="StarTarget" value="@entity.StarTarget" />
            <input type="hidden" id="StarTargetRemark" name="StarTargetRemark" value="@entity.StarTargetRemark" />
            <input type="hidden" id="ShowIndex" name="ShowIndex" value="@entity.ShowIndex" />
            <input type="hidden" id="State" name="State" value="@entity.State" />
            <input type="hidden" id="Remark" name="Remark" value="@entity.Remark" />
            <input type="hidden" id="AgentID" name="AgentID" value="@entity.AgentID" />
            <input type="hidden" id="MediumOfCommunicationStaffID" name="MediumOfCommunicationStaffID" value="@entity.MediumOfCommunicationStaffID" />
            <input type="hidden" id="StationedStaffID" name="StationedStaffID" value="@entity.StationedStaffID" />
            <input type="hidden" id="OwnerID" name="OwnerID" value="@entity.OwnerID" />
            <input type="hidden" id="ReNameDeadline" name="ReNameDeadline" value="@entity.ReNameDeadline" />
            <input type="hidden" id="NegotiatedPrice" name="NegotiatedPrice" value="@entity.NegotiatedPrice" />
            <input type="hidden" id="LowHouseType" name="LowHouseType" value="@entity.LowHouseType" />
            <input type="hidden" id="IsLocked" name="IsLocked" value="@entity.IsLocked" />
            <input type="hidden" id="IsDeleted" name="IsDeleted" value="@entity.IsDeleted" />
            <input type="hidden" id="CreatedTime" name="CreatedTime" value="@entity.CreatedTime" />

            <div class="form-group">
                <label class="col-xs-2 control-label">价格优势：</label>
                <div class="col-xs-10">
                    <input id="PriceAdvantage" name="PriceAdvantage" value="@entity.PriceAdvantage" type="text" class="form-control">
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>请填写价格优势</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-2 control-label">户型面积：</label>
                <div class="col-xs-10">
                    <input id="HouseTypeArea" name="HouseTypeArea" value="@entity.HouseTypeArea" type="text" class="form-control">
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>请填写户型面积</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-2 control-label">生活配套：</label>
                <div class="col-xs-10">
                    <input id="LivingFacilities" name="LivingFacilities" value="@entity.LivingFacilities" type="text" class="form-control">
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>请填写生活配套</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-2 control-label">学区配套：</label>
                <div class="col-xs-10">
                    <input id="SchoolDistrict" name="SchoolDistrict" value="@entity.SchoolDistrict" type="text" class="form-control">
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>请填写学区配套</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-2 control-label">交通出行：</label>
                <div class="col-xs-10">
                    <input id="Transportation" name="Transportation" value="@entity.Transportation" type="text" class="form-control">
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>请填写交通出行</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-2 control-label">区域发展：</label>
                <div class="col-xs-10">
                    <input id="RegionalDevelopment" name="RegionalDevelopment" value="@entity.RegionalDevelopment" type="text" class="form-control">
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>请填写区域发展</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-2 control-label">项目特色：</label>
                <div class="col-xs-10">
                    <input id="Characteristic" name="Characteristic" value="@entity.Characteristic" type="text" class="form-control">
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>请填写项目特色</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-2 control-label">品牌优势：</label>
                <div class="col-xs-10">
                    <input id="BrandAdvantage" name="BrandAdvantage" value="@entity.BrandAdvantage" type="text" class="form-control">
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>请填写品牌优势</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-2 control-label">竞品对比：</label>
                <div class="col-xs-10">
                    <input id="HaveProductComparison" name="HaveProductComparison" value="@entity.HaveProductComparison" type="text" class="form-control">
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>请填写竞品对比</span>
                </div>
            </div>


            <div class="row">
                <div class="col-sm-12">
                    <button id="submit" class="btn btn-primary pull-right" type="submit">
                        <i class="fa fa-check"></i>&nbsp;提&nbsp;交
                    </button>
                </div>
            </div>
        </form>
    </div>


    <!-- 全局js -->
    <script type="text/javascript" src="~/Scripts/jquery.min.js?v=2.1.4"></script>
    <script type="text/javascript" src="~/Scripts/bootstrap.min.js?v=3.3.6"></script>

    <!-- 自定义js -->
    <script src="js/content.js?v=1.0.0"></script>


    <!-- jQuery Validation plugin javascript-->
    <script type="text/javascript" src="~/Scripts/plugins/validate/jquery.validate.min.js"></script>
    <script type="text/javascript" src="~/Scripts/plugins/validate/messages_zh.min.js"></script>
    <script type="text/javascript" src="~/Scripts/Extensions/ExtValidator.js"></script>

    <!-- layer javascript -->
    <script type="text/javascript" src="~/Scripts/plugins/layer/layer.min.js"></script>
    <script src="/Scripts/plugins/iCheck/icheck.min.js"></script>
    <!-- layerDate plugin javascript -->
    <script type="text/javascript" src="~/Scripts/plugins/layer/laydate/laydate.js"></script>

    <script type="text/javascript">
        $(function () {
            var icon = "<i class='fa fa-times-circle'></i> ";
            var validator = $("#mainForm").validate({
                submitHandler: function (form) {
                    $.ajax({
                        url: "/LowPriceHouse/LowPriceHouse/PropertyParameterEditAsync",
                        type: "post",
                        dataType: "json",
                        data: $('#mainForm').serialize(),
                        success: function (data) {
                            //Info,Success,Warning,Error
                            var type = data.type;
                            if (type == 1) {
                                layer.msg(data.content, { icon: 6, time: 2000 },
                                    function () {
                                        var index = parent.layer.getFrameIndex(window.name);
                                        parent.layer.close(index);
                                    });

                            } else {
                                layer.msg(data.content, { icon: 5, time: 2000 });
                            }
                        }
                    });
                }
            });
        });
        //日期范围限制
        var start = {
            elem: '#start',
            format: 'YYYY/MM/DD HH:mm:ss',
            min: laydate.now(), //设定最小日期为当前日期
            max: '2099-06-16 23:59:59', //最大日期
            istime: true,
            istoday: false,
            choose: function (datas) {
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };
        var end = {
            elem: '#end',
            format: 'YYYY/MM/DD HH:mm:ss',
            min: laydate.now(),
            max: '2099-06-16 23:59:59',
            istime: true,
            istoday: false,
            choose: function (datas) {
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };
        laydate(start);
        laydate(end);

    </script>
</body>
</html>
